package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.InsuranceProduct;
import cn.wolfcode.trip.base.query.InsuranceQuery;
import cn.wolfcode.trip.base.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;

public interface InsuranceProductMapper {
    int deleteByPrimaryKey(Long id);

    int insert(InsuranceProduct record);

    InsuranceProduct selectByPrimaryKey(Long id);

    List<InsuranceProduct> selectAll();

    int updateByPrimaryKey(InsuranceProduct record);

    // 给保险产品增加高级查询功能
    List<?> selectForList(QueryObject qo);

    // 保险：查询推荐产品
    List<HashMap> selectForAppList(InsuranceQuery qo);

    // 保险：查询所有公开/非禁用产品
    List<InsuranceProduct> selectForPubProducts(InsuranceQuery qo);

    // 查询选定产品信息
    InsuranceProduct getInsuranceProductById(Long id);

    // 根据保险类型id删除产品
    void deleteByInsuranceId(Long id);
}